Package com.netscape.cmscore.dbs
Class LDAPVirtualList<E extends IDBObj>
java.lang.Object
com.netscape.certsrv.dbs.DBVirtualList<E>
com.netscape.cmscore.dbs.LDAPVirtualList<E>
@Deprecated(since="11.6.0",
forRemoval=true)
public class LDAPVirtualList<E extends IDBObj>
extends DBVirtualList<E>
Deprecated, for removal: This API element is subject to removal in a future version.
A class represents a virtual list of search results.
Note that this class must be used with DS4.0.
- Version:
- $Revision$, $Date$
- Author:
- thomask, mzhao
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.Logger
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionLDAPVirtualList
(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list.LDAPVirtualList
(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String sortKey) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list.LDAPVirtualList
(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String[] sortKey) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list.LDAPVirtualList
(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String[] sortKey, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list.LDAPVirtualList
(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String sortKey, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list.LDAPVirtualList
(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String startFrom, String sortKey, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated, for removal: This API element is subject to removal in a future version.getElementAt
(int index) Deprecated, for removal: This API element is subject to removal in a future version.fetch data of a single list item Recommend to call getSize() before getElementAt() or getElements() since you'd better check if the index is out of bound first.int
Deprecated, for removal: This API element is subject to removal in a future version.get the top of the buffergetJumpToElementAt
(int i) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves and jumps to element in the given position.boolean
getPage
(int first) Deprecated, for removal: This API element is subject to removal in a future version.Get a page starting at "first" (although we may also fetch some preceding entries) Recommend to call getSize() before getElementAt() or getElements() since you'd better check if the index is out of bound first.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Called by application to scroll the list with initial letters.int
Deprecated, for removal: This API element is subject to removal in a future version.get the virutal selected indexint
getSize()
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the size of this virtual list.int
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.Returns current index.void
processElements
(int startidx, int endidx, ElementProcessor<E> ep) Deprecated, for removal: This API element is subject to removal in a future version.This function processes elements as soon as it arrives.void
setPageSize
(int size) Deprecated, for removal: This API element is subject to removal in a future version.Set the paging size of this virtual list.void
setSortKey
(String sortKey) Deprecated, for removal: This API element is subject to removal in a future version.set the sort keyvoid
setSortKey
(String[] sortKeys) Deprecated, for removal: This API element is subject to removal in a future version.set the sort key
-
Field Details
-
logger
public static org.slf4j.Logger loggerDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
LDAPVirtualList
public LDAPVirtualList(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs) throws EBaseException Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list. Be sure to setPageSize() later if your pageSize is not the default 10 Be sure to setSortKey() before fetchs param registry the registry of attribute mappers param c the ldap connection. It has to be version 3 and upper param base the base distinguished name to search from param filter search filter specifying the search criteria param attrs list of attributes that you want returned in the search results- Throws:
EBaseException
-
LDAPVirtualList
public LDAPVirtualList(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String[] sortKey) throws EBaseException Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list. Be sure to setPageSize() later if your pageSize is not the default 10 param registry the registry of attribute mappers param c the ldap connection. It has to be version 3 and upper param base the base distinguished name to search from param filter search filter specifying the search criteria param attrs list of attributes that you want returned in the search results param sortKey the attributes to sort by- Throws:
EBaseException
-
LDAPVirtualList
public LDAPVirtualList(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String sortKey) throws EBaseException Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list. Be sure to setPageSize() later if your pageSize is not the default 10 param registry the registry of attribute mappers param c the ldap connection. It has to be version 3 and upper param base the base distinguished name to search from param filter search filter specifying the search criteria param attrs list of attributes that you want returned in the search results param sortKey the attribute to sort by- Throws:
EBaseException
-
LDAPVirtualList
public LDAPVirtualList(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String[] sortKey, int pageSize) throws EBaseException Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list. param registry the registry of attribute mappers param c the ldap connection. It has to be version 3 and upper param base the base distinguished name to search from param filter search filter specifying the search criteria param attrs list of attributes that you want returned in the search results param sortKey the attributes to sort by param pageSize the size of a page. There is a 3*pageSize buffer maintained so pageUp and pageDown won't invoke fetch from ldap server- Throws:
EBaseException
-
LDAPVirtualList
public LDAPVirtualList(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String sortKey, int pageSize) throws EBaseException Deprecated, for removal: This API element is subject to removal in a future version.Constructs a virtual list. param registry the registry of attribute mappers param c the ldap connection. It has to be version 3 and upper param base the base distinguished name to search from param filter search filter specifying the search criteria param attrs list of attributes that you want returned in the search results param sortKey the attribute to sort by param pageSize the size of a page. There is a 3*pageSize buffer maintained so pageUp and pageDown won't invoke fetch from ldap server- Throws:
EBaseException
-
LDAPVirtualList
public LDAPVirtualList(DBRegistry registry, netscape.ldap.LDAPConnection c, String base, String filter, String[] attrs, String startFrom, String sortKey, int pageSize) throws EBaseException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
EBaseException
-
-
Method Details
-
setPageSize
public void setPageSize(int size) Deprecated, for removal: This API element is subject to removal in a future version.Set the paging size of this virtual list. The page size here is just a buffer size. A buffer is kept around that is three times as large as the number of visible entries. That way, you can scroll up/down several items(up to a page-full) without refetching entries from the directory.- Overrides:
setPageSize
in classDBVirtualList<E extends IDBObj>
- Parameters:
size
- the page size
-
setSortKey
Deprecated, for removal: This API element is subject to removal in a future version.set the sort key- Overrides:
setSortKey
in classDBVirtualList<E extends IDBObj>
- Parameters:
sortKey
- the attribute to sort by- Throws:
EBaseException
- failed to set
-
setSortKey
Deprecated, for removal: This API element is subject to removal in a future version.set the sort key- Overrides:
setSortKey
in classDBVirtualList<E extends IDBObj>
- Parameters:
sortKeys
- the attributes to sort by- Throws:
EBaseException
- failed to set
-
getSize
public int getSize()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the size of this virtual list. Recommend to call getSize() before getElementAt() or getElements() since you'd better check if the index is out of bound first.- Overrides:
getSize
in classDBVirtualList<E extends IDBObj>
- Returns:
- current size in list
-
getSizeBeforeJumpTo
public int getSizeBeforeJumpTo()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:DBVirtualList
Returns current index.- Overrides:
getSizeBeforeJumpTo
in classDBVirtualList<E extends IDBObj>
- Returns:
- current index
-
getSizeAfterJumpTo
public int getSizeAfterJumpTo()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getSizeAfterJumpTo
in classDBVirtualList<E extends IDBObj>
-
getCurrentIndex
public int getCurrentIndex()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getCurrentIndex
in classDBVirtualList<E extends IDBObj>
-
getPage
public boolean getPage(int first) Deprecated, for removal: This API element is subject to removal in a future version.Get a page starting at "first" (although we may also fetch some preceding entries) Recommend to call getSize() before getElementAt() or getElements() since you'd better check if the index is out of bound first.- Overrides:
getPage
in classDBVirtualList<E extends IDBObj>
- Parameters:
first
- the index of the first entry of the page you want to fetch
-
getPage
Deprecated, for removal: This API element is subject to removal in a future version.Called by application to scroll the list with initial letters. Consider text to be an initial substring of the attribute of the primary sorting key(the first one specified in the sort key array) of an entry. If no entries match, the one just before(or after, if none before) will be returned as mSelectedIndex- Overrides:
getPage
in classDBVirtualList<E extends IDBObj>
- Parameters:
text
- the prefix of the first entry of the page you want to fetch
-
getElementAt
Deprecated, for removal: This API element is subject to removal in a future version.fetch data of a single list item Recommend to call getSize() before getElementAt() or getElements() since you'd better check if the index is out of bound first. If the index is out of range of the virtual list, an exception will be thrown and return null- Overrides:
getElementAt
in classDBVirtualList<E extends IDBObj>
- Parameters:
index
- the index of the element to fetch
-
getJumpToElementAt
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:DBVirtualList
Retrieves and jumps to element in the given position.- Overrides:
getJumpToElementAt
in classDBVirtualList<E extends IDBObj>
- Parameters:
i
- position- Returns:
- object
-
processElements
Deprecated, for removal: This API element is subject to removal in a future version.This function processes elements as soon as it arrives. It is more memory-efficient.- Overrides:
processElements
in classDBVirtualList<E extends IDBObj>
- Parameters:
startidx
- starting indexendidx
- ending indexep
- object to call- Throws:
EBaseException
- failed to process elements
-
getSelectedIndex
public int getSelectedIndex()Deprecated, for removal: This API element is subject to removal in a future version.get the virutal selected index- Overrides:
getSelectedIndex
in classDBVirtualList<E extends IDBObj>
- Returns:
- selected index
-
getFirstIndex
public int getFirstIndex()Deprecated, for removal: This API element is subject to removal in a future version.get the top of the buffer- Overrides:
getFirstIndex
in classDBVirtualList<E extends IDBObj>
- Returns:
- first index
-
LDAPPagedSearch